Propositional equality for gradual dependently typed programming

نویسندگان

چکیده

Gradual dependent types can help with the incremental adoption of dependently typed code by providing a principled semantics for imprecise and proofs, where some parts have been omitted. Current theories gradual types, though, lack central feature type theory: propositional equality. Lennon-Bertrand et al. show that, when reflexive proof refl is only closed value an equality type, extension Calculus Inductive Constructions (CIC) violates static observational equivalences. Extensionally-equal functions should be indistinguishable at run time, but they distinguished using combination imprecision. This work presents language that supports We avoid above issues devising which not inhabitant. Instead, each accompanied term least as precise equated terms, acting witness their plausible These witnesses track partial information program runs, raising errors shows two terms are undeniably inconsistent. Composition internalized construct language, deferred function bodies whose evaluation blocked variables. thus ensure extensionally-equal compose without error, thereby preventing contexts from distinguishing them. describe challenges designing consistency precision relations this system, along solutions to these challenges. Finally, we prove important metatheory: safety, conservative embedding CIC, weak canonicity, guarantees Siek al., reducing program’s introduces no new or dynamic errors.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Dependently Typed Meta-programming

Dependent types and multi stage programming have both been used, separately, as implementation techniques for programming languages. Each technique has its own advantages — with dependent types, we can verify aspects of interpreters and compilers such as type safety and stack invariants. Multi stage programming, on the other hand, can give the implementor access to underlying compiler technolog...

متن کامل

Generic Programming within Dependently Typed Programming

We show how higher kinded generic programming can be represented faithfully within a dependently typed programming system. This development has been implemented using the Oleg system. The present work can be seen as evidence for our thesis that extensions of type systems can be done by programming within a dependently typed language, using data as codes for types.

متن کامل

Automation for Dependently Typed Functional Programming

Writing dependently typed functional programs that capture non-trivial program properties, such as those involving membership, ordering and non-linear arithmetic, is difficult in current system due to lack of proof automation. We identify and discuss proof patterns that occur when programming with dependent types and detail how the automation of such patterns allow us to work more comfortably w...

متن کامل

Dependently-typed programming in scienti c computing

Computer simulations are essential in virtually every scienti c discipline, even more so in those such as economics or climate change where the ability to make laboratory experiments is limited. Therefore, it is important to ensure that the models are implemented correctly, that they can be re-implemented and that the results can be reproduced. Typically, though, the models are described by a m...

متن کامل

Dependently Typed Programming with Domain-Specific Logics

This dissertation describes progress on programming with domain-specific specification logics in dependently typed programming languages. Domain-specific logics are a promising way to verify software, using a logic tailored to a style of programming or an application domain. Examples of domain-specific logics include separation logic, which has been used to verify imperative programs, and autho...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

ژورنال

عنوان ژورنال: Proceedings of the ACM on programming languages

سال: 2022

ISSN: ['2475-1421']

DOI: https://doi.org/10.1145/3547627